home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / dbexport / _setup.1 / frmTest.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-09-27  |  4.1 KB  |  138 lines

  1. VERSION 5.00
  2. Object = "{9E28F528-1297-11D1-814E-444553540000}#13.0#0"; "DBEXPORT.OCX"
  3. Begin VB.Form frmTest 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Test DBExport"
  6.    ClientHeight    =   4095
  7.    ClientLeft      =   2295
  8.    ClientTop       =   2070
  9.    ClientWidth     =   4245
  10.    Icon            =   "frmTest.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   4095
  15.    ScaleWidth      =   4245
  16.    ShowInTaskbar   =   0   'False
  17.    Begin DBExportActiveX.DBExport DBExport1 
  18.       Height          =   345
  19.       Left            =   1980
  20.       TabIndex        =   7
  21.       Top             =   3600
  22.       Visible         =   0   'False
  23.       Width           =   300
  24.       _ExtentX        =   529
  25.       _ExtentY        =   609
  26.       IniFile         =   "ExportSettings.ini"
  27.    End
  28.    Begin VB.ComboBox Combo1 
  29.       Height          =   315
  30.       ItemData        =   "frmTest.frx":030A
  31.       Left            =   2280
  32.       List            =   "frmTest.frx":0317
  33.       Style           =   2  'Dropdown List
  34.       TabIndex        =   3
  35.       Top             =   3000
  36.       Width           =   1875
  37.    End
  38.    Begin VB.DriveListBox Drive1 
  39.       Height          =   315
  40.       Left            =   120
  41.       TabIndex        =   2
  42.       Top             =   3000
  43.       Width           =   1815
  44.    End
  45.    Begin VB.FileListBox File1 
  46.       Height          =   2040
  47.       Left            =   2220
  48.       Pattern         =   "*.MDB"
  49.       TabIndex        =   1
  50.       Top             =   504
  51.       Width           =   1932
  52.    End
  53.    Begin VB.CommandButton Command2 
  54.       Cancel          =   -1  'True
  55.       Caption         =   "Close"
  56.       Height          =   375
  57.       Left            =   480
  58.       TabIndex        =   4
  59.       Top             =   3600
  60.       Width           =   1335
  61.    End
  62.    Begin VB.DirListBox Dir1 
  63.       Height          =   2232
  64.       Left            =   108
  65.       TabIndex        =   0
  66.       Top             =   504
  67.       Width           =   1935
  68.    End
  69.    Begin VB.CommandButton cmdExport 
  70.       Caption         =   "Export"
  71.       Height          =   375
  72.       Left            =   2460
  73.       TabIndex        =   6
  74.       Top             =   3600
  75.       Width           =   1335
  76.    End
  77.    Begin VB.Label Label1 
  78.       Caption         =   "Select any Table and click on 'Export'"
  79.       Height          =   255
  80.       Left            =   810
  81.       TabIndex        =   5
  82.       Top             =   120
  83.       Width           =   2820
  84.    End
  85. Attribute VB_Name = "frmTest"
  86. Attribute VB_GlobalNameSpace = False
  87. Attribute VB_Creatable = False
  88. Attribute VB_PredeclaredId = True
  89. Attribute VB_Exposed = False
  90. Option Explicit
  91. Dim connect As TypeConnect
  92. Private Sub cmdExport_Click()
  93.     Select Case Combo1.ListIndex
  94.     Case 0 ' access database : let the user choose the table to export (MultiTable=True)
  95.          DBExport1.DatabaseName = Dir1.Path & "\" & File1.filename
  96.          DBExport1.MultiTable = True
  97.     Case Else ' PDox or DBase, export one table at a time (MultiTable=False)
  98.          DBExport1.DatabaseName = Dir1.Path
  99.          DBExport1.TableName = File1.filename
  100.          DBExport1.MultiTable = False
  101.     End Select
  102.     DBExport1.ConnectString = connect
  103.     DBExport1.IniFile = App.Path & "\ExportSettings.ini"
  104.     DBExport1.Execute
  105. End Sub
  106. Private Sub Combo1_Click()
  107.     Select Case Combo1.ListIndex
  108.     Case 0
  109.         File1.Pattern = "*.MDB"
  110.         connect = Access
  111.     Case 1
  112.         File1.Pattern = "*.DB"
  113.         connect = Paradox5
  114.     Case 2
  115.         File1.Pattern = "*.DBF"
  116.         connect = DBase5
  117.     End Select
  118. End Sub
  119. Private Sub Command1_Click()
  120. End Sub
  121. Private Sub Command2_Click()
  122.     Unload Me
  123. End Sub
  124. Private Sub Dir1_Change()
  125.     File1.Path = Dir1.Path  ' Set file path.
  126. End Sub
  127. Private Sub Drive1_Change()
  128.     Dir1.Path = Drive1.Drive    ' Set directory path.
  129. End Sub
  130. Private Sub File1_DblClick()
  131.     cmdExport_Click
  132. End Sub
  133. Private Sub Form_Load()
  134.     Combo1.ListIndex = 0
  135. End Sub
  136. Private Sub Test_Click()
  137. End Sub
  138.